#@layout()

#define script()
<script>

    function process() {
        openlayer('处理提现申请','#(CPATH)/admin/finance/payoutprocess/#(payout.id)');
    }

    function refuse() {
        openlayer('拒绝提现','#(CPATH)/admin/finance/payoutrefuse/#(payout.id)');
    }

    function openlayer(title,url) {
        layer.data = {};
        layer.open({
            type: 2,
            title: title,
            anim: 2,
            shadeClose: true,
            shade: 0.3,
            area: ['70%', '60%'],
            content: url,
            end: function () {
                if (layer.data.needRefresh == true){
                    location.reload();
                }
            }
        });
    }

</script>

#end

#define content()
    <section class="content-header">
        <h1>
            提现申请
            <small>Payout Submit</small>
        </h1>
    </section>

    <section class="content">

        <div class="container-fluid">
                <div class="card card-outline card-primary">



                    <!-- /.card-header -->
                    <!-- form start -->
                    <form class="" autocomplete="off">
                        <div class="card-body">

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">当前状态</label>
                                <div class="col-sm-7 form-text">
                                    #(payout.statusStr ??)
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">用户当前余额</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control" value="#number(userAmount,'0.00')" readonly>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">提现金额</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#number(payout.amount,'0.00')" readonly>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">身份证号码</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.user_idcard ??)" readonly>
                                </div>
                            </div>



                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">身份证姓名</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.user_real_name ??)" readonly>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">提现到</label>
                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.payTypeStr ??)" readonly>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">收款账号</label>

                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#(payout.pay_to ??)" readonly>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">用户备注</label>
                                <div class="col-sm-7">
                                    <textarea rows="3" class="form-control" readonly >#(payout.remarks ??)</textarea>
                                </div>
                            </div>


                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">手续费</label>

                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#number(payout.fee,'0.00')" readonly>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">应转账</label>

                                <div class="col-sm-7">
                                    <input type="input" class="form-control"  value="#number(payout.amount - payout.fee,'0.00')" readonly>
                                </div>
                            </div>


                        </div>

                        <div class="card-footer">
                            <div class="offset-sm-2 col-sm-10 submit-block">
                                <div class="card-submit">
                                    <a href="#(CPATH)/admin/finance/payout" class="btn btn-primary">返回</a>
                                    #if(payout.isApplying())
                                    <button type="button" onclick="process()" class="btn btn-primary">处理</button>
                                    <button type="button" onclick="refuse()" class="btn btn-primary">拒绝</button>
                                    #end
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>

    </section>
#end
